Bus master and bus snooper for execution of global operations utilizing a single token for multiple operations with explicit release

ABSTRACT

In response to a need to initiate one or more global operations, a bus master within a multiprocessor system issues a combined token and operation request in a single bus transaction on a bus coupled to the bus master. The combined token and operation request solicits a single existing token required to complete the global operations within the multiprocessor system and identifies the first of the global operations to be processed with the token, if granted. Once a bus master is granted the token, no other bus master will be granted the token until the current token owner explicitly requests release. The current token owner repeats the combined token and operation request for each global operation which needs to be initiated and, on the last global operation, issues a combined request with an explicit release. Acknowledgement of the combined request with release implies release of the token for use by other bus masters.

RELATED APPLICATIONS

The present invention is related to the subject matter of commonly assigned, copending United States patent applications: Ser. No. 09/435,925 entitled “BUS MASTER FOR SMP EXECUTION OF GLOBAL OPERATIONS UTILIZING A SINGLE TOKEN WITH IMPLIED RELEASE” Ser. No. 09/435,929 entitled “BUS SNOOPER FOR SMP EXECUTION OF GLOBAL OPERATIONS UTILIZING A SINGLE TOKEN WITH IMPLIED RELEASE”; Ser. No. 09/436,023 entitled “BUS PROTOCOL AND TOKEN MANAGER FOR SMP EXECUTION OF GLOBAL OPERATIONS UTILIZING A SINGLE TOKEN WITH IMPLIED RELEASE”; Ser. No. 09/435,924 entitled “BUS PROTOCOL AND TOKEN MANAGER FOR EXECUTION OF GLOBAL OPERATIONS UTILIZING A SINGLE TOKEN FOR MULTIPLE OPERATIONS WITH EXPLICIT RELEASE”; Ser. No. 09/435,927 entitled “BUS PROTOCOL, BUS MASTER AND BUS SNOOPER FOR EXECUTION OF GLOBAL OPERATIONS UTILIZING MULTIPLE TOKENS”; and Ser. No. 09/435,926 entitled “TOKEN MANAGER FOR EXECUTION OF GLOBAL OPERATIONS UTILIZING MULTIPLE TOKENS”. The content of the above-identified applications are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention generally relates to processing of global operations in multiprocessor systems and in particular to employing tokens to permit speculative execution of global operations within multiprocessor systems. Still more particularly, the present invention relates to implementing a bus master and bus snooper employing a single token for speculative execution of multiple global operations within a multiprocessor system.

2. Description of the Related Art

Many operations performed within multiprocessor systems may be executed locally by a single processor without immediately involving or affecting other processors within the system. For example, a processor may write a modified cache line to a local cache without making the write operation immediately visible to all other processors. A write-back of the modified data to system memory may be deferred until a later time or combined, through a modified intervention, with a subsequent read operation by a different processor for the same cache line.

However, processors within multiprocessor systems periodically execute operations which must be globally visible to all other processors within the system. By their nature, these operations require the involvement of all other processors. For example, within the PowerPC architecture, a processor may execute an instruction cache clock invalidate (ICBI), translation lookaside buffer invalidate (TLBI), or synchronization (SYNCH) operation. A synchronizing operation, for instance, may be employed to allow prior instructions within an instruction stream executing on a pipelined, out-of-order multiprocessor system to complete before performing a context switch.

Existing designs for multiprocessor systems support global operations by implementing a queue for such operations within each processor for every other processor within the system. That is, a processor within a system having three other processors will include three queues for snooping global operations. The depth of each snoop queue will equal the latency of the combined response in order to prevent system livelocks. Thus, where a system requires five bus cycles to generate a combined response to an address transaction, the global operation queues will have a pipeline which is five levels deep.

This approach to supporting global operations is extremely hardware intensive and is not scalable. As the operating frequency and the number of processors within a system increases, driving the latency of a combined response up to close to 100 cycles, the approach described above becomes unwieldy. As the window for the combined response becomes larger, snooper implementations become more complex and costly.

It would be desirable, therefore, to to broadcast global operations in a highly scalable multiprocessor system while keeping masters and snoopers as simple as possible but also preventing system livelocks. It would also be desirable to decouple the depth of snoop queues from the width of address to combined response windows, and to maintain high frequency operation while increasing the number of processor in a system supporting global operations.

SUMMARY OF THE INVENTION

It is therefore one object of the present invention to provide improved processing of global operations in multiprocessor systems.

It is another object of the present invention to provide a mechanism for employing tokens to permit speculative execution of global operations within multiprocessor systems.

It is yet another object of the present invention to provide a bus master and bus snooper employing a single token for speculative execution of multiple operations within a multiprocessor system.

The foregoing objects are achieved as is now described. In response to a need to initiate one or more global operations, a bus master within a multiprocessor system issues a combined token and operation request in a single bus transaction on a bus coupled to the bus master. The combined token and operation request solicits a single existing token required to complete the global operations within the multiprocessor system and identifies the first of the global operations to be processed with the token, if granted. Once a bus master is granted the token, no other bus master will be granted the token until the current token owner explicitly requests release. The current token owner repeats the combined token and operation request for each global operation which needs to be initiated and, on the last global operation, issues a combined request with an explicit release. Acknowledgement of the combined request with release implies release of the token for use by other bus masters.

The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself however, as well as a preferred mode of use, further objects and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:

FIG. 1 depicts a block diagram of a data processing system in which a preferred embodiment of the present invention may be implemented;

FIG. 2 is an address bus transaction data structure employed for global operations within a multiprocessor system in accordance with a preferred embodiment of the present invention;

FIG. 3 depicts a timing diagram for a hypothetical sequence of global operations within a multiprocessor system in accordance with a preferred embodiment of the present invention;

FIG. 4 is a high level flowchart for a process within a bus master of issuing global operations in a system employing a single token permitting multiple operations in accordance with a preferred embodiment of the present invention;

FIGS. 5A-5C depict a high level flow chart for a process within a bus participant of snooping global operations in a system employing a single token for multiple operations in accordance with a preferred embodiment of the present invention; and

FIG. 6 is a state diagram for token control logic in a system employing a single token for multiple global operations in accordance with a preferred embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

With reference now to the figures, and in particular with reference to FIG. 1, a block diagram of a data processing system in which a preferred embodiment of the present invention may be implemented is depicted. Data processing system 100 is a symmetric multiprocessor (SMP) system including a plurality of processors 102 aa through 102 an and 102 ma through 102 mn (where “m” and “n” are integer-valued variables). Each processor 102 aa-102 mn includes a respective level one (L1) cache 104 aa-104 mn, preferably on chip with the processor and bifurcated into separate instruction and data caches. Each processor 102 aa-102 mn is coupled via a processor bus 106 aa-106 l to a level two cache 108 a-108 l (where “l” is an integer-valued variable), which are in-line caches shared by multiple processors in the exemplary embodiment.

Although in the exemplary embodiment only two processors are depicted as sharing each L2 cache, and only two L2 caches are depicted, those skilled in the art will appreciate that additional processors and L2 caches may be utilized in a multiprocessor data processing system in accordance with the present invention. For example, each L2 cache may be shared by four processors, and a total of sixteen L2 caches may be provided.

Each L2 cache 108 a-108 l is connected to a level three (L3) cache 110 a-110 l and to system bus 112. L3 caches 110 a-110 l are actually in-line caches rather than lookaside caches as FIG. 1 suggests, but operations received from a vertical L2 cache (e.g., L2 cache 108 a) are initiated both within the L3 cache 110 a and on system bus 112 concurrently to reduce latency. If the operation produces a cache hit within the L3 cache 110 a, the operation is cancelled or aborted on system bus 112. On the other hand, if the operation produces a cache miss within the L3 cache 110 a, the operation is allowed to proceed on system bus 112.

The lower cache levels—L2 caches 108 a-108 l and L3 caches 110 a-110 l—are employed to stage data to the L1 caches 104 a-104 l and typically have progressively larger storage capacities but longer access latencies. L2 caches 108 a-108 l and L3 caches 110 a-110 l thus serve as intermediate storage between processors 102 aa-102 mn and system memory 114, which typically has a much larger storage capacity but may have an access latency many times that of L3 caches 110 a-110 l. Both the number of levels in the cache hierarchy and the cache hierarchy configuration (i.e, shared versus private, in-line versus lookaside) employed in data processing system 100 may vary.

L2 caches 108 a-108 l and L3 caches 110 a-110 l are connected to system memory 114 via system bus 112. Also connected to system bus 112 may be a memory mapped device 116, such as a graphics adapter providing a connection for a display (not shown), and input/output (I/O) bus bridge 118. I/O bus bridge 118 couples system bus 112 to I/O bus 120, which may provide connections for I/O devices 122, such as a keyboard and mouse, and nonvolatile storage 124, such as a hard disk drive. System bus 112, I/O bus bridge 118, and I/O bus 120 thus form an interconnect coupling the attached devices, for which alternative implementations are known in the art.

Non-volatile storage 124 stores an operating system and other software controlling operation of system 100, which are loaded into system memory 114 in response to system 100 being powered on. Those skilled in the art will recognize that data processing system 100 may include many additional components not shown in FIG. 1, such as serial and parallel ports, connections to networks or attached devices, a memory controller regulating access to system memory 114, etc. Such modifications and variations are within the spirit and scope of the present invention.

Each processor 102 aa-102 mn may initiate operations which must be globally visible within data processing system 100. A processor initiating such an operations will begin a bus transaction on a corresponding processor bus to an L2 cache, which will in turn begin a corresponding system bus transaction on system bus 112. Other L2 caches not sharing a common processor bus with the processor initiating the operation will snoop the operation off the system bus 112 and initiate a corresponding bus transaction on the respective processor bus coupled to the L2 cache. The global operation is performed as described in further detail below.

Referring to FIG. 2, an address bus transaction data structure employed for global operations within a multi-processor system in accordance with a preferred embodiment of the present invention is illustrated. Address bus transaction data structure 202 illustrates the token bus protocol address/response definitions for a system supporting only one global operation per token. Address bus transaction data structure 202, which is employed on the processor and system address buses for global operations, includes: an address 202 a for the target of the operation, if any; a tag 202 b including a processor identifier for the processor within the system which initiates the operation; a transaction type identifier 202 c designating the type of operation being initiated (i.e., ICBI, TLBI, etc.); and token management flags 202 d.

The present invention employs a token to prevent system livelocks by conflicting global operations. Each device within the storage hierarchy which is capable of initiating a global operation on a lower level bus (processors 102 aa-102 mn and L2 caches 108 a-108 l in the exemplary embodiment of FIG. 1) contains bus interface logic for driving address bus transaction data structure 202 and for receiving and appropriately reacting to the combined response, as well as snoop logic for detecting address bus transaction data structure 202 and for driving an appropriate snoop response. Each device within the storage hierarchy which receives global operations from a higher level bus (L2 caches 108 a-108 l, L3 caches 110 a-110 l, and system memory 114 in the exemplary embodiment of FIG. 1) contains bus interface logic for detecting address bus data structure 202 and for driving an appropriate response. Additionally, a token manager is implemented, typically integrated with the bus arbitration function in a bus controller.

A bus master must request and receive a token for a global operation from the token manager before the operation may be completed. If the token is not received by the bus master, the operation must be retried. The token manager controls granting of the token or tokens to prevent conflict between global operations, granting a token only when available (i.e., not currently being utilized) and refusing token requests until the appropriate token is released by a current owner. The token manager thus ensures serialization of global operations.

In the present invention, a token request is submitted with the address transaction data structure 202 initiating a global operation, so that a token required to perform the operation is requested simultaneously with an attempt to initiate the operation. This avoids the latency required to request and receive a token before issuing the operation, which may then be retried anyway. Such latency may be significant as the combined response window approaches 100 cycles in systems having many processors (e.g., 128-way SMP systems).

The token management flags 202 d are employed to request initiation or completion of a global operation. The token request and the operation request may be made jointly or separately to allow completion of operations which were speculatively started but retried, as described below. The possible permutations of token management flags 202 d are detailed in Table I, together with the significance of the flag states as an indicator of the type of request being made and the possible combined responses to each supported request are also listed.

TABLE I Flags Request Type Possible combined response 000 Token request retry or ack 001 — — 010 Token + Op request token ack/snoop retry ack (token & snoop) retry (token & snoop) 011 Token + Op w/ release token ack/snoop retry ack (token & snoop) retry (token & snoop) 100 Op request retry or ack 101 Op w/ release retry or ack

As shown in Table I, a token request may be made alone, without an operation request, and an operation request may be made alone, without a token request, or a combined token and operation request may be made by a bus master. Normally a bus master initiating a global operation or the first of a series of global operations for the first time will issue a combined token and operation request. The combined token and operation request minimizes latency as described above and allows speculative processing of the operation.

The combined token and operation request is limited to one time, attempted only the first time a particular global operation or the first in a sequence of global operations is initiated (i.e., not attempted when a global operation is being retried). Subsequent attempts to initiate a global operation utilize the token request (only) and operation request (only). However, the frequency of occurrence of global operations on a system bus is very small compared to normal data transfer operations. As a result, serialization of global operations enforced by token protocol has no meaningful impact on overall system processing.

An operation request may be utilized by itself by a bus master where a previous combined token and operation request received a grant of the requested token but a snoop retry of the requested operation was asserted. However, a retry of a token request intrinsically implies a snoop retry (i.e., a combined response retrying the token request portion of a combined token and operation request while acknowledging the operation request portion of the combined request is not supported in order to prevent system livelocks). Speculative processing of an operation by snoopers can occur whenever a combined token and operation request is retried, although this speculative processing will have to be aborted if an operation request (only) is subsequently snooped. A token request (only) is unlikely to be utilized in the present invention unless more than one bus master is competing for the token at the same time.

The request types listed in Table I with the description “w/release” indicate to the token manager that the corresponding request is the only or the last operation to be performed with the token. When these request types receive a combined response acknowledging the request, the response “implies” that the token has been released.

With the single token, speculative processing system described, snoopers need only have a single queue for global operations, greatly reducing and simplifying the hardware required to support global operations in large multi-processor systems (e.g., 128-way SMP systems). By allowing N (an integer number) of global operations per token, a series of related global operations may be more efficiently performed.

With reference now to FIG. 3, a timing diagram for a hypothetical sequence of global operations within a multi-processor system in accordance with a preferred embodiment of the present invention is depicted. The example depicted is for a single token bus protocol with speculative processing of operations, allowing N operations per token. Within the example shown, which employs address bus transaction data structure 202 illustrated in FIG. 2 for initiating global operations, “TOR” designates a combined token and operation request, “TR” designates a token request (only), “OR” designates an operation request (only), and “w/rel” designated a token and/or operation request with release of the token as described above.

In the example of FIG. 3, an address transaction for a combined token and operation request (“TOR-A”) is driven on a bus during bus cycle 0 by a processor having a processor identifier (“PID”) of “X”. Neither snooper 0 nor snooper 1 is busy with any other global operation, and both begins speculative processing of the operation requested by address transaction A. A combined response is driven by the combined response logic during bus cycle 3 (a three-cycle combined response window is assumed for this example) acknowledging (granting) the combined token and operation request of address transaction A.

During bus cycle 1, an address transaction for a different combined token and operation request with release (“TOR w/rel-B”) is driven on the bus by a processor having an identifier of “Y”. However, both snooper 0 and snooper 1 are busy with the previous global operation TOR-A and therefore transmit a retry snoop response to the combined request with release, which results in a combined response during bus cycle 4 retrying the combined token and operation request of address transaction B.

An address transaction C for an operation request (only) with release (“OR w/rel-C”) is driven on the bus during bus cycle 4 by the same processor which drove the address transaction A for TOR-A. Snooper 0, having completed the operation requested by address transaction A, begins processing the operation requested by address transaction C. Snooper 1, however, remains busy processing the operation requested by address transaction A, and therefore retries the operation OR w/rel-C. If a snooper is processing a combined token and operation request and detects an operation request (only) from the same processor with a different address, the snooper retries the operation request (only) and continues processing the combined token and operation request. If a snooper is processing a combined token and operation request and detects an operation request (only) from a different processor, however, the snooper does not retry the operation request (only), but instead suspends processing of the combined token and operation request and begins processing the new operation request (only).

During bus cycle 7, a combined response of retry is driven to the operation OR w/rel-C. Meanwhile processor Y, during bus cycle 6, drives a token request (only) (“TR-B”), which receives a retry combined response during bus cycle 9. Also during bus cycle 9, processor X again drives the operation OR w/rel-C. Snooper 0 has completed processing operation OR w/rel C, and snooper 1 is no longer busy, having completed processing operation TOR-A. Therefore, the operation OR w/rel-C driven during bus cycle 9 received an acknowledge combined response during bus cycle 12. The acknowledge combined response implies release of the single token for use in future global operations.

Snooper 0—having already completed the operation OR w/rel-C—merely collapses (does not retry) that operation, while snooper 1 begins speculatively processing operation OR w/rel-C, completing the operation during bus cycle 14. During bus cycle 13, processor Y again drives the address transaction for operation TR-B (previously retried when driven during bus cycle 6), and receives an acknowledge combined response during bus cycle 16 since the token was released by the acknowledge combined response during bus cycle 12 to operation OR w/rel-C.

When a snooper completes a snoop operation, the snooper saves the address and processor identifier for the completed operation in a history register so that, when the next combined token and operation request is snooped, the snooper may begin processing the new operation while continuing to collapse the previous operation (in case the previous operation is still spinning on the bus waiting for an acknowledge combined response). The snooper thus avoids processing the same operation twice in the case where the snooper speculatively completes the first operation, then snoops a second speculative combined token and operation request (from the same processor, in the present invention) and completes that operation while the first operation is still spinning on the bus trying to get a null (acknowledge) response. Any snooped operation request (only) with an address and processor identifier match on the (valid) contents of the history register is collapsed (i.e., not retried).

To maintain consistency and prevent potential system livelocks, several constraints should be imposed on processing of combined token and operation requests and subsequent operation requests (only). If a snooper is processing a combined token and operation request and detects a subsequent operation request (only) from the same processor but with a different address, the snooper must retry the operation request (only) and continue processing the combined token and operation request. If a snooper is processing a combined token and operation request and detects a subsequent operation request (only) from a different processor (which implies that the other processor has been granted the token), the snooper suspends processing of the combined token and operation request and begins processing the new operation request (only).

Referring to FIG. 4, a high level flow chart for a process within a bus master of issuing global operations in a system employing a single token permitting multiple operations in accordance with a preferred embodiment of the present invention is illustrated. This example and other examples herein relate to a system utilizing a single token for which multiple global operations may be performed before explicit release of the token.

The process begins at step 402, with a device (processor or cache) initiating a global operation on a bus within a system. The process first passes to step 404, which illustrates the initiating device issuing a combined token and operation request or a combined token and operation request with release (if only a single global operation is required), then passes to step 406, which depicts a determination of what combined response is received for the combined token and operation request or combined token and operation request with release.

If a retry combined response is received, the process proceeds to step 408, which illustrates the initiating device issuing a token request (only) on the bus, and then to step 410, which depicts a determination of what combined response is received for the token request (only). If a retry response to the token request (only) is received, the process returns to step 408 and issues another token request (only). However, if an acknowledge response is received to the token request (only), the process proceeds to step 412, which illustrates issuing an operation request (only) or an operation request (only) with release.

The process next passes to step 414, which depicts a determination of what combined response is received to the operation request (only) or operation request (only) with release. If a retry response is received, the process returns to step 412 and issues another operation request (only) or operation request (only) with release.

However, if an acknowledge response is received to the operation request (only), the process proceeds to step 416, which illustrates a determination of whether the previous operation was the last (or only) global operation for the device having the token—i.e., determining whether the last combined token and operation request or operation request (only) was with release. If not, the process returns to step 412 for issuance of another operation request (only) or operation request (only) with release. If so, however, the process proceeds instead to step 418, with the process being complete.

Referring back to step 406, if a token acknowledge, operation retry response is received to the combined token and operation request, the process proceeds to step 412, in which the initiating device issues an operation request (only) or an operation request (only) with release. If an acknowledge response is received to the combined token and operation request in step 406, however, the process proceeds instead directly to step 416. Receipt of an acknowledge to both portions of a combined token and operation request with release, or to an operation request (only) with release, implies release of the token for a subsequent global operation.

With reference now to FIGS. 5A through 5C, a high level flow chart for a process within a bus participant of snooping global operations in a system employing a single token for multiple operations in accordance with a preferred embodiment of the present invention is depicted. The process begins at step 502, and passes first to step 504, which illustrates a determination of whether an address transaction for an operation request (only) (“OR”) or a combined token and operation request (“TOR”) has been snooped from a bus (the snooper ignores token-only requests except to note when they are granted by a combined response acknowledging the token-only request) and, if a combined token and operation request has been snooped, whether either (1) the token is currently available and released by the last bus master which was granted the token (i.e., a previous combined token and operation request with release was acknowledged in its entirety or a previous operation request following a combined token and operation request with release or a token request with release was acknowledged) or (2) the processor identifier (“PID”) for the originating processor matches the processor identifier for the last token request which was acknowledged or the last combined token and operation request for which at least the token portion was acknowledged (granting the token to the originating bus master for that token-only request or combined token and operation request). The snooper need not process an operation if the token was previously checked out by a different bus master and has not yet been released. If not, the process returns to step 504 and continues polling for an address transaction for operation request (only) or a combined token and operation request.

When an address transaction for an operation request (only) or a combined token and operation request is snooped from the bus, the process proceeds from step 504 to step 506, which depicts responding to the snooped address bus transaction with a snoop response of acknowledge, and then to step 508, which illustrates allocating the queue for the snooped operation (which involves saving the address and processor identifier for the snooped operation to the snoop queue) and beginning processing of the snooped operation. If the snooped address transaction is for a operation request (only), the process passes to step 540 depicted in FIG. 5B.

If the snooped address bus transaction is for a combined token and operation request, the process proceeds from step 508 to step 510, which depicts a determination of whether the processing of the operation from the snooped combined token and operation request is completed. If so, the process proceeds to step 550 depicted in FIG. 5C. If not, however, the process proceeds instead to step 512, which illustrates a determination of whether an operation request (only), a new combined token and operation request, or a synchronization (“Sync”) request has been snooped from the bus. If not, the process returns to step 510 to continue polling for completion of the global operation from the snooped combined token and operation request and detection of any subsequent global operation.

If an operation request (only) is detected at step 512, the process proceeds instead to step 514, which depicts a determination of whether the processor identifier (“PID”) of the processor which sourced the newly-snooped operation matches the processor identifier of the snooped global operation being processed within the snoop queue from the combined token and operation request detected at step 508. If not, the process proceeds to step 516, which illustrates a determination of the value of the “HistVal” flag, a valid flag qualifying the contents of the address and processor identifier history register within the snooper. If the HistVal flag is clear (set to zero), the process returns to step 506 to acknowledge the newly-snooped operation request (only).

If the HistVal flag is set, however, the process proceeds to step 518, which depicts a determination of whether the address (“Addr”) and processor identifier for the newly-snooped operation request (only) matches the address and processor identifier stored in the history register. If not, the process proceeds to step 520, which illustrates clearing the HistVal flag, and then returns to step 506. If the address and processor identifier are matched to the history register contents in step 518, the process returns instead to step 510.

When a snooper completes a snoop operation, the snooper saves the address and processor identifier for the completed operation in the history register. This allows the snooper, upon snooping the next combined token and operation request, to begin processing the new operation while continuing to collapse the previous operation (in case the previous operation is still spinning on the bus awaiting an acknowledge combined response). The snooper thus avoids processing the same operation twice in the case where the snooper speculatively completes the first operation, then snoops a second speculative combined token and operation request and completes that operation while the first operation is still spinning on the bus trying to get a null (acknowledge) response. Any snooped operation request (only) with an address and processor identifier match on the (valid) contents of the history register is collapsed (i.e., not retried).

Referring back to step 514, if the processor identifier for the newly-snooped operation request (only) matches that of the snooped operation being process in the snoop queue, the process proceeds instead to step 522, which depicts a determination of whether the address of the newly-snooped operation request (only) matches the address of the snooped operation being processed within the snoop queue. If not, the process proceeds to step 524, which illustrates asserting a retry snoop response. If the addresses match, however, or once the retry snoop response is asserted, the process proceeds to step 526, which depicts clearing the HistVal flag to invalidate the contents of the history register. The process then returns to step 510.

Referring once again to step 512, if a combined token and operation request is snooped (the snooper ignores token-only requests), the process proceeds to step 528, which illustrates asserting a retry snoop response, and then returns to step 510. If a synchronization operation is detected in step 512, the process proceeds instead to step 530, which depicts a determination of whether the processor identifier for the snooped synchronization operation matches the processor identifier for the snooped operation being processed within the snoop queue.

If the processor identifiers for the snooped synchronization operation and the operation being processed in the snoop queue match, the process proceeds to step 532, which illustrates clearing the HistVal flag, and then to step 528. If the processor identifiers for the snooped synchronization operation and the operation being processed in the snoop queue do not match, the process proceeds instead to step 534, which depicts a determination of the state of the HistVal flag. If the HistVal flag is clear, the process returns to step 510. If the HistVal flag is set, the process proceeds instead to step 536, which illustrates a determination of whether the processor identifier for the newly-snooped synchronization operation matches the processor identifier stored within the history register.

If the processor identifier for the newly-snooped synchronization operation does not match the processor identifier stored within the history register, the process merely returns to step 510. However, a snooped synchronization operation with a processor identifier matching the contents of the history register will invalidate the contents of the history register. Therefore, if the processor identifier for the newly-snooped synchronization operation does not match the processor identifier stored within the history register, the process proceeds instead to step 538, which depicts clearing the HistVal flag, and then returns to step 510.

From step 508, when an operation request (only) is detected, the process proceeds to step 540 depicted in FIG. 5B, which illustrates a determination of whether processing of the snooped operation request (only) is completed. If so, the process proceeds to step 550 depicted in FIG. 5C. If processing is not yet complete, however, the process proceeds instead to step 542, which depicts a determination of whether an operation request (only), a combined token and operation request, or a synchronization operation has been detected on the bus by the snooper. If not, the process simply returns to step 540 to continue polling for completion of the operation request (only) and for initiation of other global operations.

If an operation request (only) is detected at step 542, the process proceeds to step 544, which illustrates a determination of whether the address and processor identifier for the new-snooped operation request (only) matches the address and processor identifier for the operation from the operation request (only) detected at step 508 which being processed in the snoop queue. If so, the process merely returns to step 540. If not, however, the process proceeds to step 546, which depicts asserting a entry snoop response, and then returns to step 540.

If a newly-snooped address transaction detected at step 542 is for a combined token and operation request, the process proceeds to step 546, in which a retry snoop response is asserted, and then returns to step 540. If a newly-snooped address transaction detected at step 542 is for a synchronization operation, the process proceeds instead to step 548, which illustrates a determination of whether the processor identifier for the newly-snooped address transaction for a synchronization operation matches the processor identifier for the previously detected operation request (only). If so, the process proceeds to step 546, in which a retry snoop response is asserted, and then returns to step 540. If not, the process returns directly to step 540.

Referring back to step 540, once processing of a snooped global operation from an operation request (only) is complete, the process proceeds from step 540 to step 550 depicted in FIG. 5C, which depicts a determination of whether an operation request (only), a combined token and operation request, or a synchronization operation is detected by the snooper while not processing any other global operation. If not, the process simply returns to step 550 to continue polling for a global operation.

If an operation request (only) is detected at step 550, the process proceeds to step 552, which illustrates a determination of whether the address and processor identifier for the detected operation request (only) matches the address and processor identifier for the completed operation. If so, the process proceeds to step 554, which illustrates clearing the HistVal flag, and then returns to step 550. If not, however, the process proceeds to step 556, which depicts a determination of the state of the HistVal flag.

If the HistVal flag is set, the process proceeds to step 558, which illustrates a determination of whether the address and processor identifier for the detected operation request (only) matches the address and processor identifier stored in the history register. If so, the process merely returns to step 550. If not, however, the process proceeds instead to step 560, which depicts clearing the HistVal flag, and then returns to step 506 depicted in FIG. 5A. The process also returns to step 506 from step 556 if the HistVal flag is determined to be cleared at that step.

If a combined token and operation request is detected at step 550, the process proceeds to step 562, which illustrates a determination of whether the address and processor identifier for the detected combined token and operation request matches the address and processor identifier for the completed operation. If so, the process simply returns to step 550. If not, however, the process proceeds to step 564, which depicts a determination of the state of the HistVal flag. If the HistVal flag is determined to be cleared at step 564, the process proceeds to step 566, which depicts loading the address and processor identifier for the previously completed operation within the queue into the history register and setting the HistVal flag, and then passes to step 506 depicted in FIG. 5A.

If the HistVal flag is set at step 564, the process proceeds instead to step 568, which illustrates a determination of whether the address and processor identifier for the detected combined token and operation request matches the address and processor identifier stored in the history register. If so, the process merely returns to step 550. If not, however, the process proceeds instead to step 570, which depicts asserting a retry snoop response, and then returns to step 550.

If a synchronization operation is detected at step 550, the process proceeds to step 572, which illustrates a determination of whether the processor identifier for the detected synchronization operation matches the processor identifier for the completed operation. If so, the process proceeds to step 574, which illustrates clearing the HistVal flag, and then returns to step 504 depicted in FIG. 5A. If not, however, the process proceeds to step 576, which depicts a determination of the state of the HistVal flag. If the HistVal flag is cleared, the process returns to step 550.

If the HistVal flag is set, the process proceeds to step 578, which illustrates a determination of whether the processor identifier for the detected synchronization operation matches the processor identifier stored in the history register. If not, the process merely returns to step 550. If so, however, the process proceeds instead to step 580, which depicts clearing the HistVal flag, and then returns to step 550.

Referring to FIG. 6, a state diagram for token control logic in a system employing a single token for multiple global operations in accordance with a preferred embodiment of the present invention is illustrated. The token control logic is typically integrated within the bus arbitration function, to implement a token manager for the sole token. State 602 depicted in FIG. 6 indicates that the token is available, while states 604 and 606 indicate that the token is checked out. State 604 indicates that the token is checked out, with the control logic awaiting an operation request (only) with release, while state 606 indicates that the token is checked out, with the control logic awaiting a combined response acknowledging an operation request (only) with release.

The control logic remains in state 602 as long as no token request (only) (“TR”) or combined token and operation request (“TOR”) or combined token and operation request with release (“TORw/rel”) is received either while the token is released or with a processor identifier matching the processor identifier of the last bus master to be granted the token. The control logic transitions from state 602 to state 604 when a token request (only) or combined token and operation request is received, either while the token is released or with a processor identifier matching the processor identifier of the last bus master to be granted the token, with the response acknowledging the token request (only) or acknowledging at least the token request portion of the combined token and operation request.

The control logic remains in state 604 as long as no operation request (only) with release (“ORw/rel”) is received. All token requests (only) and combined token and operation requests and combined token and operation requests with release which are detected while the control logic is in state 604 are retried. However, operation requests (only) will be acknowledged while the token control logic is in state 604.

The control logic transitions from state 604 to state 606 when an operation request (only) with release is received, and an acknowledge response is driven to the operation request (only) with release. The control logic also transitions from state 602 to state 606 when a combined token and operation request with release is received, either while the token is released or with a processor identifier matching the processor identifier of the last bus master to be granted the token, and an acknowledge response to at least the token request portion of the combined token and operation request with release is driven.

The control logic remains in state 606 as long as no combined response (“CR”), or a retry combined response, to the operation request (only) or the combined token and operation request is received. The control logic transitions back to state 602 from state 606 when a combined response acknowledging the operation request (only) with release or the combined token and operation request with release is received.

The present invention serializes global operations with simplified and reduced hardware, requiring fewer snoop queues for each bus participant. By implementing only a single token, the required queue depth is kept minimal. Requiring a bus master to explicitly request release of the token allows multiple, serial operations to be sequentially completed for a single bus master, with release of the token implied by acknowledging a request with release. Support for combined token and operation requests allows speculative execution of the operation and minimizes overall latency.

While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention. 

What is claimed is:
 1. A method of processing global operations within a multiprocessor system, comprising: responsive to a need to process one or more global operations, issuing a combined token and operation request in a single bus transaction including a token portion seeking a token required to complete global operations and an operation portion designating a first global operation of the one or more global operations to be processed; responsive to receiving a combined response acknowledging both the token portion and the operation portion, treating the first global operation as complete and, if necessary, issuing a combined token and operation request for a next global operation of the one or more global operations to be processed; and issuing a combined token and operation request with release for a last global operation of the one or more global operations to be processed.
 2. The method of claim 1, wherein the step of issuing a combined token and operation request with release for a last global operation of the one or more global operations to be processed further comprises: issuing the combined token and operation request with release for the first global operation.
 3. The method of claim 1, wherein the step of issuing a combined token and operation request with release for a last global operation of the one or more global operations to be processed further comprises: issuing the combined token and operation request with release for a global operation other than the first global operation.
 4. The method of claim 1, further comprising: issuing a combined token and operation request for each of the one or more global operations to be processed.
 5. The method of claim 4, further comprising: responsive to receiving a combined response which retries a token portion of a combined token and operation request for one of the one or more global operations to be processed, issuing a token request and, upon receiving a combined response acknowledging the token request, issuing an operation request for the one of the one or more global operations.
 6. The method of claim 4, further comprising: responsive to receiving a combined response which acknowledges a token portion but retries an operation portion of a combined token and operation request for one of the one or more global operations to be processed, issuing an operation request for the one of the one or more global operations.
 7. The method of claim 4, further comprising: responsive to receiving a combined response which acknowledges both a token portion and an operation portion of a combined token and operation request for one of the one or more global operations to be processed, treating the one of the one or more global operations as complete and, if necessary, issuing a combined token and operation request for a subsequent one of the one or more global operations to be processed.
 8. A system for processing global operations within a multiprocessor system, comprising: a bus coupled to at least one snooper; and a bus master coupled to the bus, wherein the bus master: responsive to a need to process one or more global operations, issues a combined token and operation request in a single bus transaction on the bus including a token portion seeking a token required to complete global operations and an operation portion designating a first global operation of the one or more global operations to be processed; responsive to receiving a combined response acknowledging both the token portion and the operation portion, treats the first global operation as complete and, if necessary, issues a combined token and operation request for a next global operation of the one or more global operations to be processed; and issues a combined token and operation request with release for a last global operation of the one or more global operations to be processed.
 9. The system of claim 8, wherein the bus master issues the combined token and operation request with release for the first global operation.
 10. The system of claim 8, wherein the bus master issues the combined token and operation request with release for a global operation other than the first global operation.
 11. The system of claim 8, wherein the bus master issues a combined token and operation request for each of the one or more global operations to be processed.
 12. The system of claim 11, wherein the bus master, responsive to receiving a combined response which retries a token portion of a combined token and operation request for one of the one or more global operations to be processed, issues a token request and, upon receiving a combined response acknowledging the token request, issues an operation request for the one of the one or more global operations.
 13. The system of claim 11, wherein the bus master, responsive to receiving a combined response which acknowledges a token portion but retries an operation portion of a combined token and operation request for one of the one or more global operations to be processed, issues an operation request for the one of the one or more global operations.
 14. The system of claim 11, wherein the bus master, responsive to receiving a combined response which acknowledges both a token portion and an operation portion of a combined token and operation request for one of the one or more global operations to be processed, treats the one of the one or more global operations as complete and, if necessary, issues a combined token and operation request for a subsequent one of the one or more global operations to be processed.
 15. A method of processing snooped global operations in a multiprocessor system, comprising: responsive to detecting a combined token and operation request including a token portion seeking a token required to complete one or more global operations and an operation portion designating a global operation to be processed, comparing a processor identifier within the combined token and operation request to a processor identifier within a last combined token and operation request or a last token request which received a combined response acknowledging at least a token portion of the last combined token and operation request or the last token request; and responsive to determining that the processor identifiers match, speculatively processing the global operation for the combined token and operation request.
 16. The method of claim 15, further comprising: responsive to determining that the processor identifiers do not match, ignoring the global operation for the combined token and operation request.
 17. The method of claim 15, further comprising: responsive to: detecting a combined token and operation request with release containing the processor identifier matching a processor identifier within a last combined token and operation request or token request which received a combined response acknowledging the last combined token and operation request or token request, and detecting a subsequent combined token and operation request, speculatively processing the global operation for the subsequent combined token and operation request.
 18. The method of claim 15, further comprising: completing a global operation only upon detecting: a combined response to a combined token and operation request for the global operation acknowledging the entire combined token and operation request, or a combined response acknowledging a subsequent operation request having a processor identifier and address matching a processor identifier and address within the combined token and operation request.
 19. The method of claim 15, further comprising: responsive to detecting an operation request containing an address other than an address within a combined token and operation request for a global operation being processed, suspending processing of the global operation being processed and processing a new global operation for the operation request containing the other address.
 20. A system for processing snooped global operations in a multiprocessor system, comprising: at least one bus master coupled to a bus within the multiprocessor system; and a snooper coupled to the bus, wherein the snooper: responsive to detecting a combined token and operation request including a token portion seeking a token required to complete one or more global operations and an operation portion designating a global operation to be processed, compares a processor identifier within the combined token and operation request to a processor identifier within a last combined token and operation request or a last token request which received a combined response acknowledging at least a token portion of the last combined token and operation request or the last token request; and responsive to determining that the processor identifiers match, speculatively processes the global operation for the combined token and operation request.
 21. The system of claim 20, wherein the snooper, responsive to determining that the processor identifiers do not match, ignores the global operation for the combined token and operation request.
 22. The system of claim 20, wherein the snooper, responsive to: detecting a combined token and operation request with release containing the processor identifier matching a processor identifier within a last combined token and operation request or token request which received a combined response acknowledging the last combined token and operation request or token request, and detecting a subsequent combined token and operation request, speculatively processes the global operation for the subsequent combined token and operation request.
 23. The system of claim 20, wherein the snooper completes a global operation only upon detecting: a combined response to a combined token and operation request for the global operation acknowledging the entire combined token and operation request, or a combined response acknowledging a subsequent operation request having a processor identifier and address matching a processor identifier and address within the combined token and operation request.
 24. The system of claim 20, wherein the snooper, responsive to detecting an operation request containing an address other than an address within a combined token and operation request for a global operation being processed, suspends processing of the global operation being processed and processing a new global operation for the operation request containing the other address. 